Skip to content

feat: parse getRTK for mower devices#1587

Open
Beennnn wants to merge 1 commit into
DeebotUniverse:devfrom
Beennnn:feat/parse-getrtk-mower
Open

feat: parse getRTK for mower devices#1587
Beennnn wants to merge 1 commit into
DeebotUniverse:devfrom
Beennnn:feat/parse-getrtk-mower

Conversation

@Beennnn

@Beennnn Beennnn commented May 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Parses the response of the existing getRTK cloud command and notifies a new RtkEvent. The Ecovacs Home app already shows these counters under the GOAT's RTK settings screen but the library currently ignores the payload.

Mapping (sample below comes from a real GOAT A1600 RTK on firmware 1.15.13):

App JSON field Event field
Usable satellites (common) observations.baseSolnSvs / roverSolnSvs base_satellites_used / rover_satellites_used
Reference station — discovered rtks[0].star base_stations[0].satellites_visible
Rover — discovered observations.roverSvs rover_satellites_visible
Signal strength observations.roverSignalScore rover_signal_score (0–100)

Sample payload:

{
  "result": 0,
  "rtks": [{"sn": "908276", "star": 30, "state": 0, "mode": 0,
            "version": "...,QD302 1.3.8,...,QD302 1.3.1"}],
  "observations": {
    "solStat": 0, "poseType": 50,
    "roverId": "908336", "roverSvs": 35, "roverSolnSvs": 30,
    "roverSignalRate": 44, "roverSignalScore": 90, "roverOcclusionRate": 8,
    "baseStnId": "\"1544\"", "baseSolnSvs": 29,
    "baseSignalRate": 45, "baseSignalScore": 94, "baseOcclusionRate": 24
  }
}

Changes

  • deebot_client/events/rtk.pyRtkEvent + RtkBaseStation dataclasses
  • deebot_client/commands/json/rtk.pyGetRtk command
  • deebot_client/capabilities.pyCapabilities.rtk (optional CapabilityEvent[RtkEvent])
  • deebot_client/hardware/xmp9ds.py — wires rtk=CapabilityEvent(RtkEvent, [GetRtk()]) for the GOAT A1600 RTK
  • tests/commands/json/test_rtk.py — full-payload + no-base-station cases

Other devices stay unaffected (rtk defaults to None).

Test

uv run pytest tests/ — 707 passed (705 existing + 2 new).

Parses the cloud response of getRTK so consumers can read RTK
status (rover/base satellite counts, signal scores, occlusion
rates, base station SN/firmware) instead of only seeing it in the
official Ecovacs Home app.

Wired into the GOAT A1600 RTK (xmp9ds) capability tree as an
optional CapabilityEvent on Capabilities.rtk; other devices stay
unaffected (rtk defaults to None).

Sample payload comes from a real GOAT A1600 RTK (firmware 1.15.13);
tests cover the full payload and the no-base-station edge case.
@Beennnn Beennnn force-pushed the feat/parse-getrtk-mower branch from 2fe84c3 to 485e8d4 Compare May 9, 2026 20:17
@codecov

codecov Bot commented May 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.82540% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.01%. Comparing base (f87b6c9) to head (485e8d4).

Files with missing lines Patch % Lines
deebot_client/commands/json/rtk.py 88.88% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1587      +/-   ##
==========================================
+ Coverage   94.99%   95.01%   +0.01%     
==========================================
  Files         158      160       +2     
  Lines        6199     6262      +63     
  Branches      353      354       +1     
==========================================
+ Hits         5889     5950      +61     
- Misses        248      249       +1     
- Partials       62       63       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq

codspeed-hq Bot commented May 9, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 113 untouched benchmarks


Comparing Beennnn:feat/parse-getrtk-mower (485e8d4) with dev (f87b6c9)

Open in CodSpeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant